#ifndef GRAPHWIDGET_H
#define GRAPHWIDGET_H
#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsScene>
#include "traffic_sim.h"
#include <QObject>

class Node;
class Agent;
class GraphWidget : public QGraphicsView
{

Q_OBJECT
	


public:
 
GraphWidget();
GraphWidget(const GraphWidget &g);
Node * addNode(Traffic_Sim::Traffic_Node_Info & info);	
Agent * addAgent(Traffic_Sim::Traffic_Vehicle * vehicle);		
void addEdge(Node * n1, Node * n2, Traffic_Sim::Traffic_Arc_Info & info_arc);
Node * searchNode(Traffic_Sim::Traffic_Node_Info & info);	
Node * searchNode1(Traffic_Sim::Traffic_Node_Info & info);

protected:
void scaleView(qreal scaleFactor);
void keyPressEvent(QKeyEvent *event);

private:

public:
QList<Node *> nodeList;
QGraphicsScene *scene;
};

#endif
